import Api from "f-fetch-utils/src/Api";
import EnvironmentUtils from "fo-utils/src/EnvironmentUtils";
const isDev = EnvironmentUtils.isDevelopment;
const Config = {
    http: 'http://',
    ws: 'ws://',
    https: 'https://',
    dev: {
        host: 'localhost',
        port: 9000
    },
    prod: {
        host: window.location.host,
        port: 9000
    }
};
let config = isDev? Config.dev: Config.prod;
const baseHttp = Config.http + config.host + ":" + config.port;
const baseWs = Config.ws + config.host + ":" + config.port;
const BaseApi = new Api(Config.http + config.host, config.port);
export {BaseApi, baseHttp ,baseWs};
export default Config;